package com.chengjue.transaction.configuration;

import com.chengjue.transaction.converter.DateConverter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 描述:
 * 配置转换器
 *
 * @author Kipeng Huang
 * @create 2018-02-27 下午3:39
 */
@Configuration
@Slf4j
public class WebMvcConfig extends WebMvcConfigurerAdapter {

	@Override
	public void addFormatters(FormatterRegistry registry) {
		registry.addConverter(new DateConverter());
		super.addFormatters(registry);
	}
}
